class A(object):
#    __prefix__ = 'A'
    def print_self_name(self):
        print type(self)
#        print dir(self)
#        print dir(self.__class__())
        print self.__prefix__

class B(A):
    __prefix__ = 'B'

class C(B):
    __prefix__ = 'C'


def test():
#    print 'A'; A().print_self_name()
    print 'B'; B().print_self_name()
    print 'C'; C().print_self_name()

test()
